package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.TmsOrderCallHistory;

import java.util.Date;
import java.util.Map;


/**
 * The interface Tms order call history service.
 *
 * @FileName: cn.huiyunche.service.base.interfaces.tms
 * @Description: TMS接口调用记录
 * @author: Aaron
 * @date: 2016 /11/3 上午10:39
 */
public interface TmsOrderCallHistoryService {

    /**
     * 调用TMS接口
     *
     * @param url           the url
     * @param urlType       the url type
     * @param paramsMap     the params map
     * @param socketTimeout the socket timeout
     * @return string string
     */
    public String urlCall(final String url, int urlType, final Map<String, Object> paramsMap, final int socketTimeout);

    /**
     * Add.
     *
     * @param callHistory the call history
     */
    void add(TmsOrderCallHistory callHistory);

    /**
     * Update.
     *
     * @param callHistory the call history
     */
    void update(TmsOrderCallHistory callHistory);

    /**
     * Gets last time success.
     *
     * @param url          the url
     * @param isSuccessful the is successful
     * @return the last time success
     */
    Date getLastTimeSuccess(String url, Boolean isSuccessful);

    /**
     * Gets last time success.
     *
     * @param type         the type
     * @param isSuccessful the is successful
     * @return the last time success
     */
    Date getLastTimeSuccess(int type, Boolean isSuccessful);
}
